<template>
    <div class="management-merchant views-container">
        <div class="wlm-table">
             <div class="wlm-table-content">
                 <!-- :ref="tableFormatData.agentlist.key"   :default-sort="{prop: 'sort', order: 'descending'}" :data="tableFormatData.agentlist.tableData" @selection-change="handleSelectionChange" -->
            <el-table  style="width: 100%" :ref="tableFormatData.billdetails.key" :data="tableFormatData.billdetails.tableData" @selection-change="handleSelectionChange">
                  <el-table-column label="订单编码（核销码）">
                       <template slot-scope="scope">
                           <span>{{scope.row.order_no}}</span>
                           <div>({{scope.row.vercode}})</div>
                       </template>
                  </el-table-column>
                    <el-table-column label="所属代理">
                       <template slot-scope="scope">
                           <span>{{scope.row.bus.name}}</span>
                       </template>
                  </el-table-column>
                    <el-table-column label="所属商家">
                       <template slot-scope="scope">
                           <span>{{scope.row.agent.agentname}}</span>
                       </template>
                  </el-table-column>
                    <el-table-column label="支付金额">
                       <template slot-scope="scope">
                           <span>￥{{scope.row.order_price}}</span>
                       </template>
                  </el-table-column>
                    <el-table-column label="商家收入">
                       <template slot-scope="scope">
                           <span>￥{{scope.row.bus_money}}</span>
                       </template>
                  </el-table-column>
                    <el-table-column label="分销商收入">
                       <template slot-scope="scope">
                           <span>￥{{scope.row.dealer_money}}</span>
                       </template>
                  </el-table-column>
                    <el-table-column label="代理收入">
                       <template slot-scope="scope">
                           <span>￥{{scope.row.agent_now_money}}</span>
                       </template>
                  </el-table-column>
                    <el-table-column label="结算时间">
                       <template slot-scope="scope">
                           <span>{{scope.row.create_time}}</span>
                       </template>
                  </el-table-column>
            </el-table>
              <div class="pagination-content flex-row flex-justify-e flex-align-c">
                   <el-pagination :disabled="!hasTableData" @size-change="listPageChange" @current-change="listPageChange" :current-page.sync="tableFormatData.billdetails.pagination.page" :page-sizes="tableFormatData.billdetails.pagination.pagesizes" :page-size.sync="tableFormatData.billdetails.pagination.list_rows" layout="total, sizes, prev, pager, next, jumper" :total="hasTableData?tableFormatData.billdetails.pagination.total : 0">
                </el-pagination>
                </div>
        </div>
        </div>
    </div>
</template>
<script>
import {getAllFinance } from "@/api/cityagent";
import mixins from '@/mixins/mixins'
export default {
      mixins: [mixins.getters('Table')],
     name: 'billdetails',
    data () {
        return {
             tableFormatData: {
        current: 'billdetails',
        billdetails: {
          key: 'billdetails',
          api: {
            getList: getAllFinance,
            // delList: deleteAgentUser,
          },
          tableData: [],
        //   otherData:{
        //     money_type:''
        //   },
          files: {
            ids: [],

          },
          pagination: {
            page: 1,
            list_rows: 10,
            pagesizes: [10, 20, 50],
            total: 0
          }
        }
      }
        }
    }
}
</script>